package org.itboys.product.dto;

import org.itboys.commons.utils.string.SelfStringUtils;
import org.itboys.mongodb.entity.BaseLongIdEntity;
import org.itboys.product.entity.CommonTouristInfo;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Indexed;

import java.util.Date;

public class CommonTouristInfoDTO {

    private Long id;
    private Long memberId;//用户Id
    private String name;//名称
    private String mobile;//手机
    private String idType;
    private String idNumber;//身份证号
    private String type;
    private Integer isDeleted = 0;//0表示未删除，1表示已删除，2表示为默认旅客
    private Integer isChoosen =0;
    public CommonTouristInfoDTO() {
    }

    public CommonTouristInfoDTO(Long id, Long memberId, String name, String mobile, String idNumber, Integer isDeleted) {
        this.id = id;
        this.memberId = memberId;
        this.name = name;
        this.mobile = mobile;
        this.idNumber = idNumber;
        this.isDeleted = isDeleted;
    }
    public CommonTouristInfoDTO(CommonTouristInfo info) {
        this.id = info.getId();
        this.memberId = info.getMemberId();
        this.name = info.getName();
        this.mobile =SelfStringUtils.mixMobile(info.getMobile());
        this.idNumber = info.getIdNumber();
        this.isDeleted = info.getIsDeleted();
        if (null!=info.getIdType()) {
        	switch (info.getIdType()) {
    		case 1:
    			this.idType="护照";
    			break;
    		case 2:
    			this.idType="身份证";
    			break;
    		case 3:
    			this.idType="驾驶证";
    			break;
    		default:
    			break;
    		}
		}
        if (null!=info.getType()) {
        	switch (info.getType()) {
    		case 1:
    			this.type="成人";
    			break;
    		case 2:
    			this.type="儿童";
    			break;
    		default:
    			break;
    		}
		}
        
    }
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

	public Integer getIsChoosen() {
		return isChoosen;
	}

	public void setIsChoosen(Integer isChoosen) {
		this.isChoosen = isChoosen;
	}

	public String getIdType() {
		return idType;
	}

	public void setIdType(String idType) {
		this.idType = idType;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

}
